home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_pow_scope_m.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
2KB
|
90 lines
# Jedi Knight Missions Cog Script
#
# POW_SCOPE_M.COG
#
# POWERUP Script - Stormtrooper rifle scope pickup
#
# [YB, CYW & RF]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing powerup local
thing player local
int bin=13 local
sound pickupsnd=thrmlpu2.wav local
sound respawnsnd=Activate01.wav local
flex amount local
int autopickup=0 local
message touched
message taken
message respawn
end
# ========================================================================================
code
touched:
player = GetSourceRef();
if (GetThingType(player) == 10) // Can only be taken by players.
{
amount = GetInv(player, GetWeaponBin(bin));
if(IsMulti() || (amount < GetInvMax(player, GetWeaponBin(bin))))
{
TakeItem(GetSenderRef(), -1);
call taken;
}
}
Return;
# ........................................................................................
taken:
player = GetSourceRef();
powerup = GetSenderRef();
// Print("Scope");
jkPrintUNIString(player, GetWeaponBin(bin));
// Do effects.
PlaySoundLocal(pickupsnd, 1, 0, 0);
AddDynamicTint(player, 0.0, 0.0, 0.2);
// Increment powerup amount.
SetInv(player, GetWeaponBin(bin), 1.0);
// Check for Auto Pickup
// Auto pickup if the player is Kyle and this is not multi player.
if ((!IsMulti()) && (GetInv(player, 67) == 0.0))
{
// autopickup = GetAutoPickup();
// if(autopickup & 1)
{
// if(!((autopickup & 4) && (GetWeaponPriority(player, GetCurWeapon(player), 0) >= GetWeaponPriority(player, bin, 0))))
{
SelectWeapon(player, GetWeaponBin(bin));
}
}
}
Return;
# ........................................................................................
respawn:
PlaySoundThingLocal(respawnsnd, GetSenderRef(), 0.6, 5.0, 10.0, 0);
Return;
end